
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>Introduction to atomman: Semidiscrete variational Peierls-Nabarro model &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Introduction to atomman: Strain class" href="4.8._Strain_class.html" />
    <link rel="prev" title="Introduction to atomman: Dislocation analysis tools" href="4.6._Dislocation_analysis_tools.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="4.8._Strain_class.html" title="Introduction to atomman: Strain class"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="4.6._Dislocation_analysis_tools.html" title="Introduction to atomman: Dislocation analysis tools"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tutorials</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  
<style>
/* CSS for nbsphinx extension */

/* remove conflicting styling from Sphinx themes */
div.nbinput.container div.prompt *,
div.nboutput.container div.prompt *,
div.nbinput.container div.input_area pre,
div.nboutput.container div.output_area pre,
div.nbinput.container div.input_area .highlight,
div.nboutput.container div.output_area .highlight {
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

div.nbinput.container > div[class*=highlight],
div.nboutput.container > div[class*=highlight] {
    margin: 0;
}

div.nbinput.container div.prompt *,
div.nboutput.container div.prompt * {
    background: none;
}

div.nboutput.container div.output_area .highlight,
div.nboutput.container div.output_area pre {
    background: unset;
}

div.nboutput.container div.output_area div.highlight {
    color: unset;  /* override Pygments text color */
}

/* avoid gaps between output lines */
div.nboutput.container div[class*=highlight] pre {
    line-height: normal;
}

/* input/output containers */
div.nbinput.container,
div.nboutput.container {
    display: -webkit-flex;
    display: flex;
    align-items: flex-start;
    margin: 0;
    width: 100%;
}
@media (max-width: 540px) {
    div.nbinput.container,
    div.nboutput.container {
        flex-direction: column;
    }
}

/* input container */
div.nbinput.container {
    padding-top: 5px;
}

/* last container */
div.nblast.container {
    padding-bottom: 5px;
}

/* input prompt */
div.nbinput.container div.prompt pre {
    color: #307FC1;
}

/* output prompt */
div.nboutput.container div.prompt pre {
    color: #BF5B3D;
}

/* all prompts */
div.nbinput.container div.prompt,
div.nboutput.container div.prompt {
    width: 4.5ex;
    padding-top: 5px;
    position: relative;
    user-select: none;
}

div.nbinput.container div.prompt > div,
div.nboutput.container div.prompt > div {
    position: absolute;
    right: 0;
    margin-right: 0.3ex;
}

@media (max-width: 540px) {
    div.nbinput.container div.prompt,
    div.nboutput.container div.prompt {
        width: unset;
        text-align: left;
        padding: 0.4em;
    }
    div.nboutput.container div.prompt.empty {
        padding: 0;
    }

    div.nbinput.container div.prompt > div,
    div.nboutput.container div.prompt > div {
        position: unset;
    }
}

/* disable scrollbars on prompts */
div.nbinput.container div.prompt pre,
div.nboutput.container div.prompt pre {
    overflow: hidden;
}

/* input/output area */
div.nbinput.container div.input_area,
div.nboutput.container div.output_area {
    -webkit-flex: 1;
    flex: 1;
    overflow: auto;
}
@media (max-width: 540px) {
    div.nbinput.container div.input_area,
    div.nboutput.container div.output_area {
        width: 100%;
    }
}

/* input area */
div.nbinput.container div.input_area {
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    /*background: #f5f5f5;*/
}

/* override MathJax center alignment in output cells */
div.nboutput.container div[class*=MathJax] {
    text-align: left !important;
}

/* override sphinx.ext.imgmath center alignment in output cells */
div.nboutput.container div.math p {
    text-align: left;
}

/* standard error */
div.nboutput.container div.output_area.stderr {
    background: #fdd;
}

/* ANSI colors */
.ansi-black-fg { color: #3E424D; }
.ansi-black-bg { background-color: #3E424D; }
.ansi-black-intense-fg { color: #282C36; }
.ansi-black-intense-bg { background-color: #282C36; }
.ansi-red-fg { color: #E75C58; }
.ansi-red-bg { background-color: #E75C58; }
.ansi-red-intense-fg { color: #B22B31; }
.ansi-red-intense-bg { background-color: #B22B31; }
.ansi-green-fg { color: #00A250; }
.ansi-green-bg { background-color: #00A250; }
.ansi-green-intense-fg { color: #007427; }
.ansi-green-intense-bg { background-color: #007427; }
.ansi-yellow-fg { color: #DDB62B; }
.ansi-yellow-bg { background-color: #DDB62B; }
.ansi-yellow-intense-fg { color: #B27D12; }
.ansi-yellow-intense-bg { background-color: #B27D12; }
.ansi-blue-fg { color: #208FFB; }
.ansi-blue-bg { background-color: #208FFB; }
.ansi-blue-intense-fg { color: #0065CA; }
.ansi-blue-intense-bg { background-color: #0065CA; }
.ansi-magenta-fg { color: #D160C4; }
.ansi-magenta-bg { background-color: #D160C4; }
.ansi-magenta-intense-fg { color: #A03196; }
.ansi-magenta-intense-bg { background-color: #A03196; }
.ansi-cyan-fg { color: #60C6C8; }
.ansi-cyan-bg { background-color: #60C6C8; }
.ansi-cyan-intense-fg { color: #258F8F; }
.ansi-cyan-intense-bg { background-color: #258F8F; }
.ansi-white-fg { color: #C5C1B4; }
.ansi-white-bg { background-color: #C5C1B4; }
.ansi-white-intense-fg { color: #A1A6B2; }
.ansi-white-intense-bg { background-color: #A1A6B2; }

.ansi-default-inverse-fg { color: #FFFFFF; }
.ansi-default-inverse-bg { background-color: #000000; }

.ansi-bold { font-weight: bold; }
.ansi-underline { text-decoration: underline; }


div.nbinput.container div.input_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight] > pre,
div.nboutput.container div.output_area div[class*=highlight].math,
div.nboutput.container div.output_area.rendered_html,
div.nboutput.container div.output_area > div.output_javascript,
div.nboutput.container div.output_area:not(.rendered_html) > img{
    padding: 5px;
    margin: 0;
}

/* fix copybtn overflow problem in chromium (needed for 'sphinx_copybutton') */
div.nbinput.container div.input_area > div[class^='highlight'],
div.nboutput.container div.output_area > div[class^='highlight']{
    overflow-y: hidden;
}

/* hide copybtn icon on prompts (needed for 'sphinx_copybutton') */
.prompt a.copybtn {
    display: none;
}

/* Some additional styling taken form the Jupyter notebook CSS */
div.rendered_html table {
  border: none;
  border-collapse: collapse;
  border-spacing: 0;
  color: black;
  font-size: 12px;
  table-layout: fixed;
}
div.rendered_html thead {
  border-bottom: 1px solid black;
  vertical-align: bottom;
}
div.rendered_html tr,
div.rendered_html th,
div.rendered_html td {
  text-align: right;
  vertical-align: middle;
  padding: 0.5em 0.5em;
  line-height: normal;
  white-space: normal;
  max-width: none;
  border: none;
}
div.rendered_html th {
  font-weight: bold;
}
div.rendered_html tbody tr:nth-child(odd) {
  background: #f5f5f5;
}
div.rendered_html tbody tr:hover {
  background: rgba(66, 165, 245, 0.2);
}
</style>
<div class="section" id="Introduction-to-atomman:-Semidiscrete-variational-Peierls-Nabarro-model">
<h1>Introduction to atomman: Semidiscrete variational Peierls-Nabarro model<a class="headerlink" href="#Introduction-to-atomman:-Semidiscrete-variational-Peierls-Nabarro-model" title="Permalink to this headline">¶</a></h1>
<p><strong>Lucas M. Hale</strong>, <a class="reference external" href="mailto:lucas&#46;hale&#37;&#52;&#48;nist&#46;gov?Subject=ipr-demo">lucas<span>&#46;</span>hale<span>&#64;</span>nist<span>&#46;</span>gov</a>, <em>Materials Science and Engineering Division, NIST</em>.</p>
<p><a class="reference external" href="http://www.nist.gov/public_affairs/disclaimer.cfm">Disclaimers</a></p>
<div class="section" id="1.-Introduction">
<h2>1. Introduction<a class="headerlink" href="#1.-Introduction" title="Permalink to this headline">¶</a></h2>
<p>This Notebook outlines how to calculate semidiscrete variational Peierls-Nabarro models of dislocation disregistries. This calculation method gives a prediction for a dislocation structure using only the material’s elastic constants and the generalized stacking fault energy map associated with the dislocation’s slip plane.</p>
<p><strong>NOTE:</strong> the calculation process is complex and may be refined over time resulting in changes to the involved functions and classes. For this reason, be aware of the atomman version used.</p>
<p><strong>Library Imports</strong></p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Standard Python libraries</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="k">import</span> <span class="n">Path</span>
<span class="kn">import</span> <span class="nn">datetime</span>

<span class="c1"># http://www.numpy.org/</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>

<span class="c1"># https://github.com/usnistgov/atomman</span>
<span class="kn">import</span> <span class="nn">atomman</span> <span class="k">as</span> <span class="nn">am</span>
<span class="kn">import</span> <span class="nn">atomman.unitconvert</span> <span class="k">as</span> <span class="nn">uc</span>

<span class="c1"># https://matplotlib.org/</span>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="o">%</span><span class="k">matplotlib</span> inline

<span class="c1"># Show atomman version</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;atomman version =&#39;</span><span class="p">,</span> <span class="n">am</span><span class="o">.</span><span class="n">__version__</span><span class="p">)</span>

<span class="c1"># Show date of Notebook execution</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Notebook executed on&#39;</span><span class="p">,</span> <span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="o">.</span><span class="n">today</span><span class="p">())</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
atomman version = 1.4.0
Notebook executed on 2021-08-05
</pre></div></div>
</div>
</div>
<div class="section" id="2.-Theory">
<h2>2. Theory<a class="headerlink" href="#2.-Theory" title="Permalink to this headline">¶</a></h2>
<p>The equations and calculations used are based on the original semidiscrete variational Peierls-Nabarro by Bulatov, et. al [<a class="reference external" href="https://doi.org/10.1103/PhysRevLett.78.4221">1</a>, <a class="reference external" href="https://doi.org/10.1103/PhysRevB.62.3099">2</a>, <a class="reference external" href="https://doi.org/10.1080/09500830050143778">3</a>], as well as additional and alternate terms [<a class="reference external" href="https://doi.org/10.1016/S0022-5096(98)00057-X">4</a>, <a class="reference external" href="https://doi.org/10.1088/1751-8113/42/2/025208">5</a>, <a class="reference external" href="https://doi.org/10.1016/j.scriptamat.2016.04.013">6</a>,
<a class="reference external" href="https://doi.org/10.1016/j.commatsci.2017.01.038">7</a>, <a class="reference external" href="https://doi.org/10.1016/j.scriptamat.2009.04.047">8</a>]. The discussion here is very brief and it is left to the reader to see the referenced papers for more details.</p>
<div class="section" id="2.1.-Disregistry-and-dislocation-density">
<h3>2.1. Disregistry and dislocation density<a class="headerlink" href="#2.1.-Disregistry-and-dislocation-density" title="Permalink to this headline">¶</a></h3>
<p>The disregistry of a dislocation, <span class="math notranslate nohighlight">\(\delta_i\)</span>, is defined as the difference in the displacement just above and below the slip plane taken as a function of the coordinate <span class="math notranslate nohighlight">\(\xi\)</span> that is along the slip plane and perpendicular to the dislocation line.</p>
<div class="math notranslate nohighlight">
\[\delta_i(\xi) = u_i^+(\xi) - u_i^-(\xi)\]</div>
<p>A dislocation density, <span class="math notranslate nohighlight">\(\rho_i\)</span>, is also defined that can be thought of as the infinitesimal Burgers vector of the dislocation at any specific <span class="math notranslate nohighlight">\(\xi\)</span> point, and is related to <span class="math notranslate nohighlight">\(\delta_i\)</span> as</p>
<div class="math notranslate nohighlight">
\[\rho_i(\xi) = \frac{d \delta_i(\xi)}{d \xi}\]</div>
<p>For a slip plane containing a single dislocation in an otherwise infinite medium, <span class="math notranslate nohighlight">\(\delta_i\)</span> and <span class="math notranslate nohighlight">\(\rho_i\)</span> can be related to the dislocation’s Burgers vector, <span class="math notranslate nohighlight">\(b_i\)</span></p>
<div class="math notranslate nohighlight">
\[\delta_i(\infty) - \delta_i(-\infty) = b_i\]</div>
<div class="math notranslate nohighlight">
\[\int_{-\infty}^{+\infty}{\rho_i(\xi) d\xi} = b_i\]</div>
</div>
<div class="section" id="2.2.-Semidiscrete-variational-Peierls-Nabarro-model">
<h3>2.2. Semidiscrete variational Peierls-Nabarro model<a class="headerlink" href="#2.2.-Semidiscrete-variational-Peierls-Nabarro-model" title="Permalink to this headline">¶</a></h3>
<p>The semidiscrete variational Peierls-Nabarro (SDVPN) model expresses the energy of a dislocation as a summation of different energy terms, each of which is a function of <span class="math notranslate nohighlight">\(\delta_i\)</span>. Here, the general dislocation energy equation is</p>
<div class="math notranslate nohighlight">
\[U_{dislocation} = U_{elastic} + U_{misfit} + U_{stress} + U_{surface} + U_{nonlocal}\]</div>
<p>Each of the energy terms is expressed with a discrete formulation that assumes the disregistry is a step function evaluated at certain points and constant in between. The disregistry is evaluated at regular intervals, with <span class="math notranslate nohighlight">\(\Delta \xi\)</span> typically corresponding to a spacing of atomic columns along the <span class="math notranslate nohighlight">\(\xi\)</span> direction giving the calculation a discreteness corresponding to an actual atomic discreteness. The SDVPN model then solves for the disregistry at the evaluated <span class="math notranslate nohighlight">\(\xi\)</span> points
that minimizes the dislocation’s energy.</p>
</div>
<div class="section" id="2.3.-Elastic-energy">
<h3>2.3. Elastic energy<a class="headerlink" href="#2.3.-Elastic-energy" title="Permalink to this headline">¶</a></h3>
<p>The elastic energy is due to the elastic energy of the dislocation. It contains two components: a configuration-dependent part associated with the interaction of the dislocation at one position interacting with the dislocation at another point, and a configuration-independent part associated with the dislocation’s long-range strain field. The elastic energy is expressed as</p>
<div class="math notranslate nohighlight">
\[U_{elastic} = \frac{1}{4\pi} \sum_i{\left[ \sum_j{\left( \chi(i, j, \Delta \xi) K_{lm} \rho_l[i] \rho_m[j] \right)} \right]} + \frac{1}{4\pi} K_{lm} b_l b_m \ln{(L)},\]</div>
<p>where <span class="math notranslate nohighlight">\(i\)</span> and <span class="math notranslate nohighlight">\(j\)</span> are integer indexes of the <span class="math notranslate nohighlight">\(\xi\)</span> evaluation points, i.e. <span class="math notranslate nohighlight">\(\xi[i+1] = \xi[i] + \Delta \xi\)</span>, <span class="math notranslate nohighlight">\(K_{lm}\)</span> is the dislocation’s energy coefficient tensor, <span class="math notranslate nohighlight">\(L\)</span> is a cutoff radius for the long-range configuration-independent elastic energy, and <span class="math notranslate nohighlight">\(\chi\)</span> is a multiplicative factor related to the distance between points <span class="math notranslate nohighlight">\(\xi[i]\)</span> and <span class="math notranslate nohighlight">\(\xi[j]\)</span> given by</p>
<div class="math notranslate nohighlight">
\[\chi(i,j,\Delta \xi) = \frac{3}{2} \Delta \xi^2 + \psi(i-1,j-1,\Delta \xi) + \psi(i,j,\Delta \xi) - \psi(i,j-1,\Delta \xi) - \psi(j,i-1,\Delta \xi),\]</div>
<div class="math notranslate nohighlight">
\[\psi(i,j,\Delta \xi) = \frac{1}{2} (i-j)^2 \Delta \xi^2 \ln{(|i-j|\Delta \xi)}.\]</div>
<p>The dislocation density, <span class="math notranslate nohighlight">\(\rho_l\)</span>, is obtained from the discrete <span class="math notranslate nohighlight">\(\delta_l\)</span> as</p>
<div class="math notranslate nohighlight">
\[\rho_l[i] = \frac{\delta_l[i] - \delta_l[i-1]}{\Delta \xi}\]</div>
<p><strong>NOTE:</strong> slightly different forms for <span class="math notranslate nohighlight">\(U_{elastic}\)</span> are found in the references due to how the different authors define the energy coefficient tensor, <span class="math notranslate nohighlight">\(K_{lm}\)</span>. Here, <span class="math notranslate nohighlight">\(K_{lm}\)</span> is defined such that in the isotropic case <span class="math notranslate nohighlight">\(K_{33} = K_{screw} = \mu\)</span>, and <span class="math notranslate nohighlight">\(K_{11} = K_{edge} = \frac{\mu}{1-\nu}\)</span> where <span class="math notranslate nohighlight">\(\mu\)</span> is the shear modulus and <span class="math notranslate nohighlight">\(\nu\)</span> is the Poisson’s ratio.</p>
</div>
<div class="section" id="2.4.-Misfit-energy">
<h3>2.4. Misfit energy<a class="headerlink" href="#2.4.-Misfit-energy" title="Permalink to this headline">¶</a></h3>
<p>The misfit energy arises from the disregistry within the dislocation spreading coinciding with crystallographically unfavorable configurations. This energy is calculated by mapping the dislocation’s disregistry onto a generalized stacking fault energy map, i.e <span class="math notranslate nohighlight">\(\gamma\)</span> surface</p>
<div class="math notranslate nohighlight">
\[U_{misfit} = \sum_i \gamma(\delta_l[i]) \Delta \xi.\]</div>
</div>
<div class="section" id="2.5.-Stress-energy">
<h3>2.5. Stress energy<a class="headerlink" href="#2.5.-Stress-energy" title="Permalink to this headline">¶</a></h3>
<p>The stress energy computes the energy due to an externally applied stress, <span class="math notranslate nohighlight">\(\tau_{ij}\)</span>, interacting with the dislocation line. Two forms have been used in SDVPN models: the original full stress form</p>
<div class="math notranslate nohighlight">
\[U_{stress} = -\frac{1}{2} \sum_i{ \left[ \left(\xi[i]^2 - \xi[i-1]^2 \right) \rho_l[i] \tau_{2l} \right]},\]</div>
<p>and a truncated form introduced by [<a class="reference external" href="https://doi.org/10.1016/j.scriptamat.2009.04.047">8</a>]</p>
<div class="math notranslate nohighlight">
\[U_{stress} = -\frac{1}{2} \sum_i{ \left[ \tau_{2l} \left(\delta_l[i] + \delta_l[i+1] \right) \Delta \xi  \right]}.\]</div>
<p>The two should be equivalent except for a configuration-independent constant.</p>
</div>
<div class="section" id="2.6.-Surface-energy">
<h3>2.6. Surface energy<a class="headerlink" href="#2.6.-Surface-energy" title="Permalink to this headline">¶</a></h3>
<p>The surface energy is a correction term introduced by [<a class="reference external" href="https://doi.org/10.1088/1751-8113/42/2/025208">5</a>] to account for the surface effect along the slip plane. The discrete gradient formulation by [<a class="reference external" href="https://doi.org/10.1016/j.scriptamat.2016.04.013">6</a>] is used by atomman</p>
<div class="math notranslate nohighlight">
\[U_{surface} = \sum_{j=1}^3 {\frac{\beta_{lj}}{4} \sum_i {\rho_l[i]^2 \Delta \xi }}\]</div>
<p>where <span class="math notranslate nohighlight">\(\beta_{lj}\)</span> is a coefficient tensor. Terms in the coefficient tensor can be</p>
</div>
<div class="section" id="2.7.-Nonlocal-energy">
<h3>2.7. Nonlocal energy<a class="headerlink" href="#2.7.-Nonlocal-energy" title="Permalink to this headline">¶</a></h3>
<p>The nonlocal energy is an alternate correction term introduced by [<a class="reference external" href="https://doi.org/10.1016/S0022-5096(98)00057-X">4</a>] to account for the nonlocal interactions directly. It is of the form</p>
<div class="math notranslate nohighlight">
\[U_{nonlocal} = \sum_m{ \alpha_m \sum_i{ \delta_l[i] \left(\delta_l[i] - \frac{\delta_l[i+m] + \delta_l[i-m]}{2} \right) \Delta \xi }}\]</div>
<p>where <span class="math notranslate nohighlight">\(\alpha_m\)</span> are correction coefficients corresponding to increasing separations between the evaluated <span class="math notranslate nohighlight">\(\xi\)</span> points. Typically, only the first coefficient <span class="math notranslate nohighlight">\(\alpha_1\)</span> is used and it is fitted by minimizing the discrepancy between the SDVPN disregistry and a full atomistic disregistry.</p>
</div>
</div>
<div class="section" id="3.-Methodology-overview">
<h2>3. Methodology overview<a class="headerlink" href="#3.-Methodology-overview" title="Permalink to this headline">¶</a></h2>
<p>Due to the complex nature of the calculation, this section provides a general overview of the steps involved in setting up and running the calculation shown in the remainder of the Notebook.</p>
<ol class="arabic simple">
<li><p><span class="math notranslate nohighlight">\(U_{elastic}\)</span> requires the energy coefficient tensor, <span class="math notranslate nohighlight">\(K_{ij}\)</span>, which is related to a material’s elastic constants and the orientation of the slip plane and elastic constants.</p>
<ol class="loweralpha simple">
<li><p>Isotropic <span class="math notranslate nohighlight">\(K_{ij}\)</span> can be calculated using a material’s shear modulus and Poisson’s ratio: <span class="math notranslate nohighlight">\(K_{11} = K_{22} = \frac{\mu}{1-\nu}\)</span>, <span class="math notranslate nohighlight">\(K_{33} = \mu\)</span>, <span class="math notranslate nohighlight">\(K_{ij} = 0\)</span> for <span class="math notranslate nohighlight">\(i \ne j\)</span>.</p></li>
<li><p>Anisotropic <span class="math notranslate nohighlight">\(K_{ij}\)</span> can be calculated using the Stroh method.</p></li>
</ol>
</li>
<li><p>A function for <span class="math notranslate nohighlight">\(\gamma(\delta_i)\)</span> needs to be created. <strong>NOTE:</strong> Only 2D GSFs currently implemented.</p>
<ol class="loweralpha simple">
<li><p>Use an analytical function.</p></li>
<li><p>2D GSF: Measure relaxed generalized stacking fault energies in two dimensions. Interpolate <span class="math notranslate nohighlight">\(\gamma(\delta_i)\)</span> dependent on <span class="math notranslate nohighlight">\(\delta_1\)</span> and <span class="math notranslate nohighlight">\(\delta_3\)</span>.</p></li>
<li><p>Pseudo 3D GSF: Measure relaxed generalized stacking fault energies in two dimensions and the associated relaxation perpendicular to the fault plane. Interpolate <span class="math notranslate nohighlight">\(\gamma(\delta_i)\)</span> and <span class="math notranslate nohighlight">\(\delta_2\)</span> dependent on <span class="math notranslate nohighlight">\(\delta_1\)</span> and <span class="math notranslate nohighlight">\(\delta_3\)</span>.</p></li>
<li><p>3D GSF: Measure unrelaxed generalized stacking fault energies in thre dimensions. Interpolate <span class="math notranslate nohighlight">\(\gamma(\delta_i)\)</span> dependent on <span class="math notranslate nohighlight">\(\delta_1\)</span>, <span class="math notranslate nohighlight">\(\delta_2\)</span> and <span class="math notranslate nohighlight">\(\delta_3\)</span>.</p></li>
</ol>
</li>
<li><p>Initial disregistry values need to be given for all of the <span class="math notranslate nohighlight">\(\xi\)</span> coordinates.</p>
<ol class="loweralpha simple">
<li><p>Use a step function such that <span class="math notranslate nohighlight">\(\delta_i(\xi &lt; 0) = 0\)</span> and <span class="math notranslate nohighlight">\(\delta_i(\xi &gt; 0) = b_i\)</span></p></li>
<li><p>Use an arctan function that smoothly varies from 0 to <span class="math notranslate nohighlight">\(b_i\)</span>.</p></li>
</ol>
</li>
<li><p>Solve the SDVPN model with <span class="math notranslate nohighlight">\(\tau_{ij}\)</span>, <span class="math notranslate nohighlight">\(\beta_{ij}\)</span>, and <span class="math notranslate nohighlight">\(\alpha_m\)</span> values all zero.</p></li>
<li><p>(Optional) Starting with the SDVPN solution from #4, add either <span class="math notranslate nohighlight">\(\beta_{ij}\)</span> or <span class="math notranslate nohighlight">\(\alpha_m\)</span> correction constants and solve.</p></li>
<li><p>(Optional) To obtain a prediction for the dislocation’s Peierls barrier, incrementally increase <span class="math notranslate nohighlight">\(\tau_{ij}\)</span> and resolve the SDVPN model until the dislocation is observed to move.</p></li>
</ol>
</div>
<div class="section" id="4.-Initialize-SDVPN-using-GammaSurface-and-VolterraDislocation">
<h2>4. Initialize SDVPN using GammaSurface and VolterraDislocation<a class="headerlink" href="#4.-Initialize-SDVPN-using-GammaSurface-and-VolterraDislocation" title="Permalink to this headline">¶</a></h2>
<div class="section" id="4.1.-Load-\gamma-surface-results">
<h3>4.1. Load <span class="math notranslate nohighlight">\(\gamma\)</span> surface results<a class="headerlink" href="#4.1.-Load-\gamma-surface-results" title="Permalink to this headline">¶</a></h3>
<p>The atomman.defect.GammaSurface class loads and represents generalized stacking fault data.</p>
<p>See <a class="reference external" href="4.5._Gamma_surface_plotting.html">4.5. Gamma surface plotting Notebook</a> for more details on this class.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Load pre-calculated stacking fault energy data (same data as used in Gamma Surface Plotting Notebook)</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">Path</span><span class="p">(</span><span class="s1">&#39;files&#39;</span><span class="p">,</span> <span class="s1">&#39;2008--Mendelev-M-I--Al--A1--Cu--fcc--111sf.json&#39;</span><span class="p">)</span>
<span class="n">gamma</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">defect</span><span class="o">.</span><span class="n">GammaSurface</span><span class="p">(</span><span class="n">model</span><span class="o">=</span><span class="n">model</span><span class="p">)</span>

<span class="n">box</span> <span class="o">=</span> <span class="n">gamma</span><span class="o">.</span><span class="n">box</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;a1vect, a2vect used:&#39;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">gamma</span><span class="o">.</span><span class="n">a1vect</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">gamma</span><span class="o">.</span><span class="n">a2vect</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
a1vect, a2vect used:
[ 0.  -0.5  0.5]
[ 0.5 -0.5  0. ]
</pre></div></div>
</div>
<p>Plot smallest cell</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">fig</span> <span class="o">=</span> <span class="n">gamma</span><span class="o">.</span><span class="n">E_gsf_surface_plot</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_10_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_10_0.png" />
</div>
</div>
<p>Plot common cell representation</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[4]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">plotting_a1vect</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">])</span> <span class="o">/</span> <span class="mi">2</span>
<span class="n">plotting_a2vect</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])</span> <span class="o">/</span> <span class="mi">2</span>
<span class="n">fig</span> <span class="o">=</span> <span class="n">gamma</span><span class="o">.</span><span class="n">E_gsf_surface_plot</span><span class="p">(</span><span class="n">a1vect</span> <span class="o">=</span> <span class="n">plotting_a1vect</span><span class="p">,</span>
                               <span class="n">a2vect</span> <span class="o">=</span> <span class="n">plotting_a2vect</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_12_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_12_0.png" />
</div>
</div>
</div>
<div class="section" id="4.2.-Get-a-Volterra-dislocation-solution">
<h3>4.2. Get a Volterra dislocation solution<a class="headerlink" href="#4.2.-Get-a-Volterra-dislocation-solution" title="Permalink to this headline">¶</a></h3>
<p>The model uses Volterra solutions to compute the interaction stresses. A Volterra solution can easily be found using the solve_volterra_dislocation.</p>
<p>See <a class="reference external" href="4.4._Dislocation_solution_and_generator.html">4.4. Dislocation solution and generator Notebook</a> for more details on the solve_volterra_dislocation function.</p>
<p><strong>Note</strong>: The slip plane used here must match the slip plane of the gamma surface, otherwise SDVPN will not know how to relate the two!</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Elastic constants for Al using the 2008--Mendelev-M-I--Al potential</span>
<span class="n">C11</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span><span class="mf">105.09</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">)</span>
<span class="n">C12</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span> <span class="mf">59.46</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">)</span>
<span class="n">C44</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">set_in_units</span><span class="p">(</span> <span class="mf">30.66</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">)</span>
<span class="n">C</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">ElasticConstants</span><span class="p">(</span><span class="n">C11</span><span class="o">=</span><span class="n">C11</span><span class="p">,</span> <span class="n">C12</span><span class="o">=</span><span class="n">C12</span><span class="p">,</span> <span class="n">C44</span><span class="o">=</span><span class="n">C44</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Cij in GPa:&#39;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">uc</span><span class="o">.</span><span class="n">get_in_units</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">Cij</span><span class="p">,</span> <span class="s1">&#39;GPa&#39;</span><span class="p">))</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Cij in GPa:
[[105.09  59.46  59.46   0.     0.     0.  ]
 [ 59.46 105.09  59.46   0.     0.     0.  ]
 [ 59.46  59.46 105.09   0.     0.     0.  ]
 [  0.     0.     0.    30.66   0.     0.  ]
 [  0.     0.     0.     0.    30.66   0.  ]
 [  0.     0.     0.     0.     0.    30.66]]
</pre></div></div>
</div>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Miller Burgers vector</span>
<span class="n">burgers_uvw</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">])</span>

<span class="c1"># Miller slip plane</span>
<span class="n">slip_hkl</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">])</span>

<span class="c1"># The dislocation&#39;s line direction (ξ_uvw) determines character</span>
<span class="n">ξ_uvw</span> <span class="o">=</span> <span class="p">[</span> <span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span> <span class="c1"># 90 degree edge</span>

<span class="n">volterra</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">defect</span><span class="o">.</span><span class="n">solve_volterra_dislocation</span><span class="p">(</span><span class="n">C</span><span class="p">,</span> <span class="n">burgers_uvw</span><span class="p">,</span> <span class="n">ξ_uvw</span><span class="o">=</span><span class="n">ξ_uvw</span><span class="p">,</span> <span class="n">slip_hkl</span><span class="o">=</span><span class="n">slip_hkl</span><span class="p">,</span> <span class="n">box</span><span class="o">=</span><span class="n">box</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="4.3.-Initializing-an-SDVPN-object">
<h3>4.3. Initializing an SDVPN object<a class="headerlink" href="#4.3.-Initializing-an-SDVPN-object" title="Permalink to this headline">¶</a></h3>
<p>The Volterra dislocation solution and gamma surface provide all of the materials properties associated with the dislocation problem. During initialization, verification checks will be performed to make certain that the dislocation solution and gamma surface are compatible.</p>
<p>There are many parameters that can be set during initialization. The first three are the most important, and the remainder are associated with settings listed in the theory section above. All the settings parameters (tau and below) can also be changed later.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>volterra</strong> (<em>atomman.defect.VolterraDislocation, optional</em>) The elastic solution for a Volterra dislocation to use as the basis of the model. Either volterra or model are required, and both cannot be given at the same time.</p></li>
<li><p><strong>gamma</strong> (<em>atomman.defect.GammaSurface, optional</em>) The gamma surface to use for the solution. Required unless model is given and the model content contains gamma surface data.</p></li>
<li><p><strong>model</strong> (<em>str or DataModelDict, optional</em>) Saved data from previous SDVPN runs to load. Either volterra or model are required, and both cannot be given at the same time.</p></li>
<li><p><strong>tau</strong> (<em>numpy.ndarray, optional</em>) A (3,3) array giving the stress tensor to apply to the system using the stress energy term. Only the xy, yy, and yz components are used. Default value is all zeros.</p></li>
<li><p><strong>alpha</strong> (<em>list of float, optional</em>) The alpha coefficient(s) used by the nonlocal energy term. Default value is [0.0].</p></li>
<li><p><strong>beta</strong> (<em>numpy.ndarray, optional</em>) The (3,3) array of beta coefficient(s) used by the gradient energy term. Default value is all zeros.</p></li>
<li><p><strong>cutofflongrange</strong> (<em>float, optional</em>) The cutoff distance to use for computing the long-range energy. Default value is 1000 Angstroms.</p></li>
<li><p><strong>fullstress</strong> (<em>bool, optional</em>) Flag indicating which stress energy algorithm to use. Default value is True.</p></li>
<li><p><strong>cdiffelastic</strong> (<em>bool, optional</em>) Flag indicating if the dislocation density for the elastic energy component is computed with central difference (True) or simply neighboring values (False). Default value is False.</p></li>
<li><p><strong>cdiffsurface</strong> (<em>bool, optional</em>) Flag indicating if the dislocation density for the surface energy component is computed with central difference (True) or simply neighboring values (False). Default value is True.</p></li>
<li><p><strong>cdiffstress</strong> (<em>bool, optional</em>) Flag indicating if the dislocation density for the stress energy component is computed with central difference (True) or simply neighboring values (False). Only matters if fullstress is True. Default value is False.</p></li>
<li><p><strong>min_method</strong> (<em>str, optional</em>) The scipy.optimize.minimize method to use. Default value is ‘Powell’, which seems to do well for this task.</p></li>
<li><p><strong>min_options</strong> (<em>dict, optional</em>) Any options to pass on to scipy.optimize.minimize. Default value is {}.</p></li>
</ul>
<p><strong>Execution tips:</strong> Tests seem to indicate that the ‘Powell’ minimization option works well for this problem. For best results, use min_options to set xtol and ftol to smaller values and run the solver multiple times in a row (minimizer may get stuck).</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">min_options</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">min_options</span><span class="p">[</span><span class="s1">&#39;disp&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>     <span class="c1"># will display convergence info</span>
<span class="n">min_options</span><span class="p">[</span><span class="s1">&#39;xtol&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1e-6</span>     <span class="c1"># smaller convergence tolerance than default</span>
<span class="n">min_options</span><span class="p">[</span><span class="s1">&#39;ftol&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1e-6</span>     <span class="c1"># smaller convergence tolerance than default</span>
<span class="c1">#min_options[&#39;maxiter&#39;] = 2    # for testing purposes</span>

<span class="c1"># Initialize SDVPN object from volterra and gamma</span>
<span class="n">pnsolution</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">defect</span><span class="o">.</span><span class="n">SDVPN</span><span class="p">(</span><span class="n">volterra</span><span class="o">=</span><span class="n">volterra</span><span class="p">,</span> <span class="n">gamma</span><span class="o">=</span><span class="n">gamma</span><span class="p">,</span> <span class="n">min_options</span><span class="o">=</span><span class="n">min_options</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="5.-Generate-initial-disregistry">
<h2>5. Generate initial disregistry<a class="headerlink" href="#5.-Generate-initial-disregistry" title="Permalink to this headline">¶</a></h2>
<p>Solving the SDVPN model requires starting with an initial guess of the disregistry.</p>
<div class="section" id="5.1-Initial-disregistry">
<h3>5.1 Initial disregistry<a class="headerlink" href="#5.1-Initial-disregistry" title="Permalink to this headline">¶</a></h3>
<p><strong>pn_arctan_disregistry()</strong></p>
<p>The atomman.defect.pn_arctan_disregistry() function computes the classic Peierls-Nabarro arctan disregistry for an array of points x</p>
<div class="math notranslate nohighlight">
\[\delta_i(x) = \frac{b}{\pi} \arctan{ \left( \frac{x}{\xi} \right)} + \frac{b_i}{2}\]</div>
<p>where <span class="math notranslate nohighlight">\(\xi\)</span> is the dislocation’s halfwidth and <span class="math notranslate nohighlight">\(b_i\)</span> is the Burgers vector.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>xmax</strong> (<em>float or None, optional</em>) Maximum value of x to use. Minimum value is taken as -xmax. At least 2 of xmax, xstep, and xnum must be not None. Default value is None.</p></li>
<li><p><strong>xstep</strong> (<em>float or None, optional</em>) Step size to use between each x value. At least 2 of xmax, xstep, and xnum must be not None. Default value is None.</p></li>
<li><p><strong>xnum</strong> (<em>int or None, optional</em>) Number of x values to use. At least 2 of xmax, xstep, and xnum must be not None. Default value is None.</p></li>
<li><p><strong>burgers</strong> (<em>numpy.ndarray, optional</em>) The Burgers vector for the dislocation. Default value is [1, 0, 0].</p></li>
<li><p><strong>halfwidth</strong> (<em>float, optional</em>) The dislocation halfwidth to use. Default value is 1.</p></li>
<li><p><strong>normalize</strong> (<em>bool, optional</em>) If True (default), the disregistry values will be scaled such that the two endpoints differ by exactly one Burgers vector.</p></li>
<li><p><strong>shift</strong> (<em>bool, optional</em>) If True (default), the disregistry will range [0, 0, 0] to burgers. If False, the disregistry will range from -burgers to burgers.</p></li>
</ul>
<p>Returns</p>
<ul class="simple">
<li><p><strong>x</strong> (<em>numpy.ndarray</em>) The x-coordinates for the disregistry values.</p></li>
<li><p><strong>disregistry</strong> (<em>numpy.ndarray</em>) The disregistry vector at each x-coordinate.</p></li>
</ul>
<p><strong>NOTE:</strong> the parameters normalize and shift should both be True for use with the SDVPN model.</p>
<p>Check burgers vector as transformed for the SDVPN solution:</p>
<ul class="simple">
<li><p>x = edge component.</p></li>
<li><p>y = normal (out-of-plane) component. Should be 0.0</p></li>
<li><p>z = screw component.</p></li>
</ul>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[8]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">b</span> <span class="o">=</span> <span class="n">pnsolution</span><span class="o">.</span><span class="n">burgers</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Transformed Burgers vector =&#39;</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Transformed Burgers vector = [2.86043063 0.         0.        ]
</pre></div></div>
</div>
<p>Generate arctan disregistry using burgers.</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[9]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">xstep</span> <span class="o">=</span> <span class="n">box</span><span class="o">.</span><span class="n">a</span> <span class="o">*</span> <span class="mi">2</span><span class="o">**</span><span class="mf">0.5</span> <span class="o">/</span> <span class="mi">4</span>  <span class="c1"># atomic column separation along [10-1] direction</span>
<span class="n">xnum</span> <span class="o">=</span> <span class="mi">100</span>
<span class="n">halfwidth</span> <span class="o">=</span> <span class="mi">2</span>

<span class="n">x</span><span class="p">,</span> <span class="n">disreg</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">defect</span><span class="o">.</span><span class="n">pn_arctan_disregistry</span><span class="p">(</span><span class="n">xstep</span><span class="o">=</span><span class="n">xstep</span><span class="p">,</span> <span class="n">xnum</span><span class="o">=</span><span class="n">xnum</span><span class="p">,</span> <span class="n">burgers</span><span class="o">=</span><span class="n">b</span><span class="p">,</span> <span class="n">halfwidth</span><span class="o">=</span><span class="n">halfwidth</span><span class="p">)</span>
</pre></div>
</div>
</div>
<p>Set x, disregistry to the SDVPN object</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[10]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">x</span> <span class="o">=</span> <span class="n">x</span>
<span class="n">pnsolution</span><span class="o">.</span><span class="n">disregistry</span> <span class="o">=</span> <span class="n">disreg</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="5.2-Check-initial-disregistry">
<h3>5.2 Check initial disregistry<a class="headerlink" href="#5.2-Check-initial-disregistry" title="Permalink to this headline">¶</a></h3>
<p>The SDVPN class has some built-in methods for checking the disregistry profile and the corresponding energy values.</p>
<ul class="simple">
<li><p><strong>total_energy(), misfit_energy(), elastic_energy(), longrange_energy(), stress_energy(), nonlocal_energy() and surface_energy()</strong> return the values for the different energy terms based on the current disregistry.</p></li>
<li><p><strong>check_energies()</strong> prints out the current energies for all of the different energy terms.</p></li>
<li><p><strong>disregistry_plot()</strong> creates a simple plot of the disregistry profiles.</p></li>
<li><p><strong>E_gsf_surface_plot()</strong> extends the corresponding GammaSurface method by including a line for the disregistry profile.</p></li>
<li><p><strong>E_gsf_vs_x_plot()</strong> plots the stacking fault energy associated with the disregistry values along x versus x.</p></li>
</ul>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[11]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">check_energies</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Dislocation energy terms in eV/Å:
Misfit energy =     0.15241997612247116
Elastic energy =    -0.21141715213384996
Long-range energy = 2.312310391118972
Stress energy =     -0.0
Surface energy =    0.0
Nonlocal energy =   0.0
Total energy =      2.253313215107593
</pre></div></div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[12]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">disregistry_plot</span><span class="p">()</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_30_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_30_0.png" />
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[13]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">E_gsf_surface_plot</span><span class="p">(</span><span class="n">a1vect</span><span class="o">=</span><span class="n">plotting_a1vect</span><span class="p">,</span> <span class="n">a2vect</span><span class="o">=</span><span class="n">plotting_a2vect</span><span class="p">,</span> <span class="n">energyperarea_unit</span><span class="o">=</span><span class="s1">&#39;mJ/m^2&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_31_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_31_0.png" />
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[14]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">E_gsf_vs_x_plot</span><span class="p">(</span><span class="n">energyperarea_unit</span><span class="o">=</span><span class="s1">&#39;mJ/m^2&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_32_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_32_0.png" />
</div>
</div>
</div>
</div>
<div class="section" id="6.-Solve-SDVPN-model">
<h2>6. Solve SDVPN model<a class="headerlink" href="#6.-Solve-SDVPN-model" title="Permalink to this headline">¶</a></h2>
<p>Calling the SDVPN.solve() method will perform the energy minimization based on the current values of x, disregistry, and the various settings parameters. Initial x and disregistry values can be passed to solve() along with new values for the different settings parameters (tau and below for the class initialization parameters).</p>
<div class="section" id="6.1.-Call-solve-the-first-time">
<h3>6.1. Call solve the first time<a class="headerlink" href="#6.1.-Call-solve-the-first-time" title="Permalink to this headline">¶</a></h3>
<p>Since x and disregistry have been set using the identified initial values, the minimization will start from there. Also note all options are as specified above.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">solve</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 11
         Function evaluations: 33184
</pre></div></div>
</div>
</div>
<div class="section" id="6.2.-Check-results">
<h3>6.2. Check results<a class="headerlink" href="#6.2.-Check-results" title="Permalink to this headline">¶</a></h3>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[16]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">check_energies</span><span class="p">()</span>
<span class="n">pnsolution</span><span class="o">.</span><span class="n">disregistry_plot</span><span class="p">()</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Dislocation energy terms in eV/Å:
Misfit energy =     0.15773145395826443
Elastic energy =    -0.2561554835193246
Long-range energy = 2.312310391118972
Stress energy =     -0.0
Surface energy =    0.0
Nonlocal energy =   0.0
Total energy =      2.2138863615579116
</pre></div></div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_37_1.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_37_1.png" />
</div>
</div>
</div>
<div class="section" id="6.3.-Repeat-minimization">
<h3>6.3. Repeat minimization<a class="headerlink" href="#6.3.-Repeat-minimization" title="Permalink to this headline">¶</a></h3>
<p>The disregistry found after relaxing will replace the initial values in the class. Subsequent calls to solve() will then use the previous run’s final results as the initial starting place. Doing repeated solves is recommended as it can help further refine the results as the minimization algorithms (especially Powell) benefit from restarts.</p>
<p>Also, note that you can change the various options and settings for subsequent runs. This can save time if you wish to see relaxed disregistries for multiple different settings, like different stress states, as the two relaxed disregistry states are likely closer to each other than the arbitrary initial state.</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[17]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
    <span class="n">pnsolution</span><span class="o">.</span><span class="n">solve</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 3952
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 3839
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 3922
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4132
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4467
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4573
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4813
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4732
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4861
Optimization terminated successfully.
         Current function value: 2.213886
         Iterations: 1
         Function evaluations: 4826
</pre></div></div>
</div>
</div>
<div class="section" id="6.4.-Check-results">
<h3>6.4. Check results<a class="headerlink" href="#6.4.-Check-results" title="Permalink to this headline">¶</a></h3>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[18]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">check_energies</span><span class="p">()</span>
<span class="n">pnsolution</span><span class="o">.</span><span class="n">disregistry_plot</span><span class="p">()</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Dislocation energy terms in eV/Å:
Misfit energy =     0.15770922556516204
Elastic energy =    -0.25613380502107364
Long-range energy = 2.312310391118972
Stress energy =     -0.0
Surface energy =    0.0
Nonlocal energy =   0.0
Total energy =      2.21388581166306
</pre></div></div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_41_1.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_41_1.png" />
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[19]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">E_gsf_surface_plot</span><span class="p">(</span><span class="n">a1vect</span><span class="o">=</span><span class="n">plotting_a1vect</span><span class="p">,</span> <span class="n">a2vect</span><span class="o">=</span><span class="n">plotting_a2vect</span><span class="p">,</span> <span class="n">energyperarea_unit</span><span class="o">=</span><span class="s1">&#39;mJ/m^2&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_42_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_42_0.png" />
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[20]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">E_gsf_surface_plot</span><span class="p">(</span><span class="n">a1vect</span><span class="o">=</span><span class="p">[</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.5</span><span class="p">],</span> <span class="n">a2vect</span><span class="o">=</span><span class="p">[</span><span class="mf">0.0</span><span class="p">,</span><span class="mf">0.5</span><span class="p">,</span><span class="o">-</span><span class="mf">0.5</span><span class="p">],</span> <span class="n">energyperarea_unit</span><span class="o">=</span><span class="s1">&#39;mJ/m^2&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_43_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_43_0.png" />
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[21]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">pnsolution</span><span class="o">.</span><span class="n">E_gsf_vs_x_plot</span><span class="p">(</span><span class="n">energyperarea_unit</span><span class="o">=</span><span class="s1">&#39;mJ/m^2&#39;</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_44_0.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_44_0.png" />
</div>
</div>
</div>
</div>
<div class="section" id="7.-Save-and-load-results">
<h2>7. Save and load results<a class="headerlink" href="#7.-Save-and-load-results" title="Permalink to this headline">¶</a></h2>
<p>The model() method outputs a data model containing all input settings and the current disregistry vectors. This can then be saved to JSON or XML and stored for later. The content can then be read in during SDVPN initialization using the model parameter or using the load() method of an already created SDVPN object.</p>
<p>Parameters</p>
<ul class="simple">
<li><p><strong>length_unit, energyperarea_unit, and pressure_unit</strong> all control the units the values are saved as. Will automatically be reinterpreted when loaded.</p></li>
<li><p><strong>include_gamma</strong> Flag indicating if the gamma surface data is to be included. Default value is False.</p></li>
</ul>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[22]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Generate model</span>
<span class="n">model</span> <span class="o">=</span> <span class="n">pnsolution</span><span class="o">.</span><span class="n">model</span><span class="p">(</span><span class="n">include_gamma</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>

<span class="c1"># Save as JSON content</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s1">&#39;sdvpn_run_1.json&#39;</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s1">&#39;UTF-8&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">model</span><span class="o">.</span><span class="n">json</span><span class="p">(</span><span class="n">fp</span><span class="o">=</span><span class="n">f</span><span class="p">,</span> <span class="n">ensure_ascii</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[23]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="c1"># Load model back in and show that it is in the previous state</span>
<span class="n">pnrestart</span> <span class="o">=</span> <span class="n">am</span><span class="o">.</span><span class="n">defect</span><span class="o">.</span><span class="n">SDVPN</span><span class="p">(</span><span class="n">model</span><span class="o">=</span><span class="s1">&#39;sdvpn_run_1.json&#39;</span><span class="p">)</span>
<span class="n">pnrestart</span><span class="o">.</span><span class="n">check_energies</span><span class="p">()</span>
<span class="n">pnrestart</span><span class="o">.</span><span class="n">disregistry_plot</span><span class="p">()</span>
<span class="n">plt</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="nboutput docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Dislocation energy terms in eV/Å:
Misfit energy =     0.15770922556516204
Elastic energy =    -0.25613380502107364
Long-range energy = 2.312310391118972
Stress energy =     -0.0
Surface energy =    0.0
Nonlocal energy =   0.0
Total energy =      2.21388581166306
</pre></div></div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<img alt="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_47_1.png" src="../_images/tutorial_4.7._Semidiscrete_variational_Peierls-Nabarro_model_47_1.png" />
</div>
</div>
</div>
<div class="section" id="8.-Peierls-stress-estimates">
<h2>8. Peierls stress estimates<a class="headerlink" href="#8.-Peierls-stress-estimates" title="Permalink to this headline">¶</a></h2>
<p>The SDVPN method can provide an extremely rough estimate of the Peierls stress (typically within 10x of atomistic results). This can be done by</p>
<ol class="arabic simple">
<li><p>Relaxing the dislocation structure as above.</p></li>
<li><p>Adjust tau to be incrementally larger along the slip plane.</p></li>
<li><p>Relax the structure again at the new tau using the relaxed structure from the previous tau as the initial guess.</p></li>
<li><p>Repeat until the solution fails to converge or the disregistry shows the dislocation line to move a substantial distance.</p></li>
</ol>
<p>Work is currently being done to study the sensitivity of this method to the calculation parameters. More details and an example will be provided once results are conclusive. As of right now, tests seem to indicate the following suggestions:</p>
<ul class="simple">
<li><p>xstep needs to correspond to d, the distance between the periodic Peierls valleys along the slip plane in the crystal.</p></li>
<li><p>The BFGS minimization style seems slightly better at capturing the critical stress than either Powell or CG.</p></li>
<li><p>Results with either stress equation appear to give nearly the same critical stresses.</p></li>
<li><p>There is some variability in the critical stress depending on the sign of tau. This can in part be due to elastic effects with the fixed x endpoints, but it does not fully account for this.</p></li>
<li><p>Publications claim that including either the surface energy or the nonlocal energy will result in Peierls stress values closer to the direct atomistic values.</p></li>
</ul>
<p><strong>Cleanup</strong></p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[24]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre>
<span></span><span class="n">Path</span><span class="p">(</span><span class="s1">&#39;sdvpn_run_1.json&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
</pre></div>
</div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Introduction to atomman: Semidiscrete variational Peierls-Nabarro model</a><ul>
<li><a class="reference internal" href="#1.-Introduction">1. Introduction</a></li>
<li><a class="reference internal" href="#2.-Theory">2. Theory</a><ul>
<li><a class="reference internal" href="#2.1.-Disregistry-and-dislocation-density">2.1. Disregistry and dislocation density</a></li>
<li><a class="reference internal" href="#2.2.-Semidiscrete-variational-Peierls-Nabarro-model">2.2. Semidiscrete variational Peierls-Nabarro model</a></li>
<li><a class="reference internal" href="#2.3.-Elastic-energy">2.3. Elastic energy</a></li>
<li><a class="reference internal" href="#2.4.-Misfit-energy">2.4. Misfit energy</a></li>
<li><a class="reference internal" href="#2.5.-Stress-energy">2.5. Stress energy</a></li>
<li><a class="reference internal" href="#2.6.-Surface-energy">2.6. Surface energy</a></li>
<li><a class="reference internal" href="#2.7.-Nonlocal-energy">2.7. Nonlocal energy</a></li>
</ul>
</li>
<li><a class="reference internal" href="#3.-Methodology-overview">3. Methodology overview</a></li>
<li><a class="reference internal" href="#4.-Initialize-SDVPN-using-GammaSurface-and-VolterraDislocation">4. Initialize SDVPN using GammaSurface and VolterraDislocation</a><ul>
<li><a class="reference internal" href="#4.1.-Load-\gamma-surface-results">4.1. Load <span class="math notranslate nohighlight">\(\gamma\)</span> surface results</a></li>
<li><a class="reference internal" href="#4.2.-Get-a-Volterra-dislocation-solution">4.2. Get a Volterra dislocation solution</a></li>
<li><a class="reference internal" href="#4.3.-Initializing-an-SDVPN-object">4.3. Initializing an SDVPN object</a></li>
</ul>
</li>
<li><a class="reference internal" href="#5.-Generate-initial-disregistry">5. Generate initial disregistry</a><ul>
<li><a class="reference internal" href="#5.1-Initial-disregistry">5.1 Initial disregistry</a></li>
<li><a class="reference internal" href="#5.2-Check-initial-disregistry">5.2 Check initial disregistry</a></li>
</ul>
</li>
<li><a class="reference internal" href="#6.-Solve-SDVPN-model">6. Solve SDVPN model</a><ul>
<li><a class="reference internal" href="#6.1.-Call-solve-the-first-time">6.1. Call solve the first time</a></li>
<li><a class="reference internal" href="#6.2.-Check-results">6.2. Check results</a></li>
<li><a class="reference internal" href="#6.3.-Repeat-minimization">6.3. Repeat minimization</a></li>
<li><a class="reference internal" href="#6.4.-Check-results">6.4. Check results</a></li>
</ul>
</li>
<li><a class="reference internal" href="#7.-Save-and-load-results">7. Save and load results</a></li>
<li><a class="reference internal" href="#8.-Peierls-stress-estimates">8. Peierls stress estimates</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="4.6._Dislocation_analysis_tools.html"
                        title="previous chapter">Introduction to atomman: Dislocation analysis tools</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="4.8._Strain_class.html"
                        title="next chapter">Introduction to atomman: Strain class</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="4.8._Strain_class.html" title="Introduction to atomman: Strain class"
             >next</a> |</li>
        <li class="right" >
          <a href="4.6._Dislocation_analysis_tools.html" title="Introduction to atomman: Dislocation analysis tools"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >Tutorials</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>